#include <stdio.h>
int main()
{
	int a = 0;
	int sn = 0;
	int j = 0;
	scanf_s("%d", &a);
	for ( int i =0;i<=4;i++)
	{
		j = a + j * 10;
		sn += j;
	}
	printf("%d", sn);

	return 0;
}